<%@page pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <%@include file="/WEB-INF/page/comm/head.jsp"%>
</head>
<body>
<div class="container" style="width:70%;margin-top:80px">
    <form class="form-horizontal" method="post">
        <div class="form-group">
            <label for="" class="col-md-3 control-label">待验证的用户编号：</label>
            <div class="col-md-8">
                <input type="text" id="userCode" class="form-control" onblur="checkUnique()"/>
                <br/>
                <span style="color:red" id="codeErr"></span>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-md-3 control-label">用户名称：</label>
            <div class="col-md-8">
                <textarea class="form-control" name="userName"></textarea>
            </div>
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-primary pull-right">验证</button>
        </div>
    </form>
</div>

<%@include file="/WEB-INF/page/comm/foot.jsp"%>
<script>
    function checkUnique(){
        $.ajax({
            type:"GET",
            url:ctx+"user/checkCode",
            data:{userCode:$("#userCode").val()},
            dataType:"text",
            success:function(msg){
                $("#codeErr").html(msg);
            }
        });


    }
</script>
</body>
</html>
